package com.consumer.service.impl;

import javax.annotation.Resource;
import java.util.concurrent.BlockingQueue;

public class TestThreadProject extends Thread{

    private BlockingQueue<String> queue;

    public TestThreadProject(BlockingQueue<String> queue){
        this.queue = queue;
    }
    @Resource
    MigrationService migrationService;
    @Override
    public void run() {
        while (!queue.isEmpty()) {
            try {
                migrationService.migrateDemandProject(queue.take());
            } catch (InterruptedException e) {
                System.out.println();
            }
        }
    }
}
